package com.runen.infinitemovement.model.entity;

import java.util.List;

/**
 * Create by LiaoDuanHong
 * Create on ${date}
 */
public class WeatherEntity {

    /**
     * status : ok
     * lang : zh_CN
     * unit : metric
     * server_time : 1562661215
     * location : [30.692471,104.008997]
     * api_status : active
     * tzshift : 28800
     * api_version : v2.2
     * result : {"status":"ok","o3":174,"co":0.8,"temperature":29,"pm10":38,"skycon":"RAIN","cloudrate":0.3,"precipitation":{"nearest":{"status":"ok","distance":0.92,"intensity":0.1875},"local":{"status":"ok","intensity":0.1218,"datasource":"radar"}},"dswrf":801.5,"visibility":25.8,"humidity":0.67,"so2":18,"ultraviolet":{"index":5,"desc":"中等"},"pres":94394.1,"aqi":67,"pm25":22,"no2":18,"apparent_temperature":30.3,"comfort":{"index":3,"desc":"热"},"wind":{"direction":295,"speed":14.04}}
     */

    public String status;
    public String lang;
    public String unit;
    public int server_time;
    public String api_status;
    public int tzshift;
    public String api_version;
    public ResultBean result;
    public List<Double> location;

    public static class ResultBean {
        /**
         * status : ok
         * o3 : 174.0
         * co : 0.8
         * temperature : 29.0
         * pm10 : 38.0
         * skycon : RAIN
         * cloudrate : 0.3
         * precipitation : {"nearest":{"status":"ok","distance":0.92,"intensity":0.1875},"local":{"status":"ok","intensity":0.1218,"datasource":"radar"}}
         * dswrf : 801.5
         * visibility : 25.8
         * humidity : 0.67
         * so2 : 18.0
         * ultraviolet : {"index":5,"desc":"中等"}
         * pres : 94394.1
         * aqi : 67
         * pm25 : 22
         * no2 : 18.0
         * apparent_temperature : 30.3
         * comfort : {"index":3,"desc":"热"}
         * wind : {"direction":295,"speed":14.04}
         */

        public String status;
        public double o3;
        public double co;
        public double temperature;
        public double pm10;
        public String skycon;
        public double cloudrate;
        public PrecipitationBean precipitation;
        public double dswrf;
        public double visibility;
        public double humidity;
        public double so2;
        public UltravioletBean ultraviolet;
        public double pres;
        public int aqi;
        public int pm25;
        public double no2;
        public double apparent_temperature;
        public ComfortBean comfort;
        public WindBean wind;

        public static class PrecipitationBean {
            /**
             * nearest : {"status":"ok","distance":0.92,"intensity":0.1875}
             * local : {"status":"ok","intensity":0.1218,"datasource":"radar"}
             */

            public NearestBean nearest;
            public LocalBean local;

            public static class NearestBean {
                /**
                 * status : ok
                 * distance : 0.92
                 * intensity : 0.1875
                 */

                public String status;
                public double distance;
                public double intensity;
            }

            public static class LocalBean {
                /**
                 * status : ok
                 * intensity : 0.1218
                 * datasource : radar
                 */

                public String status;
                public double intensity;
                public String datasource;
            }
        }

        public static class UltravioletBean {
            /**
             * index : 5.0
             * desc : 中等
             */

            public double index;
            public String desc;
        }

        public static class ComfortBean {
            /**
             * index : 3
             * desc : 热
             */

            public int index;
            public String desc;
        }

        public static class WindBean {
            /**
             * direction : 295.0
             * speed : 14.04
             */

            public double direction;
            public double speed;
        }
    }
}
